OPCODE_NOP           = 0
OPCODE_PACK_PROG     = 1
OPCODE_UNPACK_PROG   = 2
OPCODE_PACK_U8       = 3
OPCODE_PACK_U16      = 4
OPCODE_PACK_U32      = 5
OPCODE_PACK_S8       = 6
OPCODE_PACK_S16      = 7
OPCODE_PACK_S32      = 8
OPCODE_PACK_STR      = 9
OPCODE_PACK_U8AR     = 10
OPCODE_PACK_U16AR    = 11
OPCODE_PACK_U32AR    = 12
OPCODE_PACK_S8AR     = 13
OPCODE_PACK_S16AR    = 14
OPCODE_PACK_S32AR    = 15
OPCODE_UNPACK_U8     = 16
OPCODE_UNPACK_U16    = 17
OPCODE_UNPACK_U32    = 18
OPCODE_UNPACK_S8     = 19
OPCODE_UNPACK_S16    = 20
OPCODE_UNPACK_S32    = 21
OPCODE_UNPACK_STR    = 22
OPCODE_UNPACK_U8AR   = 23
OPCODE_UNPACK_U16AR  = 24
OPCODE_UNPACK_U32AR  = 25
OPCODE_UNPACK_S8AR   = 26
OPCODE_UNPACK_S16AR  = 27
OPCODE_UNPACK_S32AR  = 28
OPCODE_RECORD_ENTER  = 29
OPCODE_RECORD_SELECT = 30
OPCODE_RECORD_LEAVE  = 31
OPCODE_ARRAY_ENTER   = 32
OPCODE_ARRAY_LEAVE   = 33

NO_PROG      = -1
PACK_PROG    = 0
UNPACK_PROG  = 1

UINT8_LEN   = 1
UINT16_LEN  = 2
UINT32_LEN  = 4
SINT8_LEN   = 1
SINT16_LEN  = 2
SINT32_LEN  = 4

#Errors
class InvalidInstructionError(RuntimeError):
    pass

class UnknownOpCodeError(RuntimeError):
    pass

class InvalidValueTypeError(RuntimeError):
    pass

